package com.aisile.admin.feign;

import com.aisile.model.media.pojos.WmNews;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @Auther:yry
 * @Date:2024/1/9 0009
 * @VERSON:1.0
 */
@FeignClient("leadnews-wemedia")
public interface WemediaFeign {


    @GetMapping("/api/v1/news/findone/{id}")
    public WmNews findByIdToFeign(@PathVariable("id") Integer id);

    /**
     *
     * @param wmNews 入参（看请求方式 json   param  url）
     * @return 出参(json)
     */
    @PostMapping("/api/v1/news/update")
    public WmNews updateWmNewsForFeign(@RequestBody WmNews wmNews);


    @GetMapping("/api/v1/news/find_release")
    public List<Integer> findRelease();

}
